instructions for sins map updater version 1.1.93/rebellion

first some  quick warnings.

1..this program will not alter any maps on a sins version that it is not setup for, ie 1.1.93 and rebellion 1.02 at present
2..the text files that accomany the program MUST KEEP THE SAME NAMES. the names are HARD CODED
3.. targetsinsver.txt contains the exact version code for the target sins version
4..orginal sins galaxies.txt contains the list of ironcladgames supplied maps and these will not be updated even if they are on the galaxyforge folder
5..(s/r)oldstruct#.txt contains examples of the old map structure that is to be searched for(removed)
6..(s/r)newstruct#.txt contains examples of the new map structure that is to be inserted
7..roldstructfix#.txt contains the set(s) of three lines that the updater adds to the wrong locations
8..rnewstructfix#.txt contains the set(s) of the lines to replace the wrong location lines
9.. the custom maps of the user will be read in to ram, then renamed .galold from .galaxy

the soldstruct# & snewstruct# are for sins/trinity
the roldstruct# & rnewstruct# are for rebellion
this was done so that both sins & rebellion can have different versions AND structure differences as a final update to the map

now the useage

1 doubleclick on sinsmapupdater.exe

2 if you get a warning about the sins version then you do not have the correct sins version. update sins through impulse

3 you can see the folders that the map updater will search through by clicking on the two buttons labeled"progfiles galaxies"
   and "local apps galaxies"

4 if you have BOTH rebellion AND sins/trinity installed you will see two extra buttons, click on the button for the expansion to update the maps for,
   BUT if you do NOT have both sin/trinity & rebellion installed you will NOT see the buttons and the map updater will only update the maps in the installed game's default locations

5 to start the update process click on the "find galaxies" button the updater will now search the program files sins directory
   AND the username local apps directories for galaxy files(for trinity) or the my documents/my games folder for rebellion

6 click on "fix found galaxies" the map updater will now work its way through the list of galaxies correcting them UNLESS 
	they are listed in "original sins galaxies.txt", looking for the text in "(s/r)oldstruct#.txt" and replacing the found test with
	the text from the similar part in "(s/r)newstruct#.txt" for each map based upon the mapversion info inside EACH map

7 when all the maps have been updated then you can click on "exit"

now an explination of the file format for the oldstruct.txt & newstruct.txt files
each map version has it's own oldstruct & newstruct text files in the name format oldstruct0.txt,oldstruct1.txt,oldstruct2.txt & newstruct0.txt,newstruct1.txt,newstruct2.txt etc.
there is now seperate struct files for both sins/trinity AND rebellion, the first letter of the filename indicates which expansion it is for the s is sins/trinity the r is rebellion

an example from snewstruct2.txt which is the lines to replace the lines in soldstruct2.txt

start$1
versionNumber 3
start$12
normalStartHomePlanetUpgradeLevel:Population #
normalStartHomePlanetUpgradeLevel:CivilianModules #
normalStartHomePlanetUpgradeLevel:TacticalModules #
normalStartHomePlanetUpgradeLevel:Home #
normalStartHomePlanetUpgradeLevel:ArtifactLevel ##
normalStartHomePlanetUpgradeLevel:Infrastructure #
quickStartHomePlanetUpgradeLevel:Population 4
quickStartHomePlanetUpgradeLevel:CivilianModules 1
quickStartHomePlanetUpgradeLevel:TacticalModules 0
quickStartHomePlanetUpgradeLevel:Home 1
quickStartHomePlanetUpgradeLevel:ArtifactLevel 10
quickStartHomePlanetUpgradeLevel:Infrastructure 2
star$0
	planet$10
		normalStartUpgradeLevelForPopulation #
		normalStartUpgradeLevelForCivilianModules #
		normalStartUpgradeLevelForTacticalModules #
		normalStartUpgradeLevelForArtifacts #
		normalStartUpgradeLevelForInfrastructure 0

line 1 is which part of the map file,eg start of map, the $ is a separator, the number is the number of lines that must match
line 2 in this sample is the mapversion number  and must match exactly or it fails
line 3 starts the second start modification locating what to change and is the same structure as line 1
line 4 is the first line to match of the 6 lines in this part
line 5 is the next line to replace
line 6  "  "	"    "   "   "
line 7  "  "	"    "   "   "
line 8  "  "	"    "   "   "
line 9  "  "	"    "   "   "

for oldstruct.txt it is the lines in the old format ie before the normalstart/quickstart additions 

the # symbol at the end of lines tells the program to get the single digit value at the end of the in the map
line and attach it to the end of the replacement line
the ## indicates that the program should look for 2 digits
the & symbol at the end of a line tells the program that all the line from the & to the end of the SOURCE is to be copied into the updated map

if you have difficulties with this program email me a description of the problem, the environment.txt and info.txt files that will be in the folder that you ran sinsmapupdater.exe from to harpo99999@hotmail.com

the program would have been still flawed if it was not for the help of silvermind.

Thank you for your wonderful help slivermind.
harpo
